package com.wchat.network.device;

import java.net.InetAddress;
import java.net.UnknownHostException;

import com.wchat.network.Configs;

public class BroadCastTarget extends AbstractSendTarget {
	
	private static final long serialVersionUID = -6316724000524929250L;
	
	private static BroadCastTarget INSTANCE = null;
	
	public static BroadCastTarget getInstance() {
		if (INSTANCE == null)
			INSTANCE = new BroadCastTarget(null);
		return INSTANCE;
	}

	private BroadCastTarget(InetAddress address) {
		super(address);
		try {
			this.address = InetAddress.getByAddress(new byte[] { (byte) 255, (byte) 255, (byte) 255, (byte) 255 });
		} catch (UnknownHostException e) {
			Configs.assertFail("can't get broadcast ip", e);
		}
	}

}
